package com.lele.filters;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;

// 过滤器链
@WebFilter("*.one")
public class Filter_C implements Filter {
    @Override
    public void init(FilterConfig filterConfig) throws ServletException {

    }

    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        System.out.println("请求C1");
        filterChain.doFilter(servletRequest,servletResponse); // 放行
        System.out.println("响应C2");
    }

    @Override
    public void destroy() {

    }
}
